<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8">
	<title>Egret</title>
	<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="full-screen" content="true" />
	<meta name="x5-fullscreen" content="true" />
	<meta name="360-fullscreen" content="true" />

<!-- 保留地开始 -->

	<link rel="stylesheet" href="libs/css.css">
	<!--这个标签为通过egret提供的第三方库的方式生成的 javascript 文件。删除 modules_files 标签后，库文件加载列表将不会变化，请谨慎操作！-->
	<!--modules_files_start-->
	<script egret="lib" src="libs/modules/egret/egret.js" src-release="libs/modules/egret/egret.min.js"></script>
	<script egret="lib" src="libs/modules/egret/egret.web.js" src-release="libs/modules/egret/egret.web.min.js"></script>
	<script egret="lib" src="libs/modules/eui/eui.js" src-release="libs/modules/eui/eui.min.js"></script>
	<script egret="lib" src="libs/modules/res/res.js" src-release="libs/modules/res/res.min.js"></script>
	<script egret="lib" src="libs/modules/tween/tween.js" src-release="libs/modules/tween/tween.min.js"></script>
	<script egret="lib" src="libs/modules/game/game.js" src-release="libs/modules/game/game.min.js"></script>
	<!--modules_files_end-->

	<!--这个标签为不通过egret提供的第三方库的方式使用的 javascript 文件，请将这些文件放在libs下，但不要放在modules下面。-->
	<!--other_libs_files_start-->
	<script egret="game" src="libs/socket.io.js"></script>
	<script egret="game" src="libs/socket.js"></script>
	<script egret="game" src="libs/key.js"></script>
	<!--other_libs_files_end-->

	<!--这个标签会被替换为项目中所有的 javascript 文件。删除 game_files 标签后，项目文件加载列表将不会变化，请谨慎操作！-->
	<!--game_files_start-->
	<script egret="game" src="bin-debug/childPanle/ChildPanle.js"></script>
	<script egret="game" src="bin-debug/Am1.js"></script>
	<script egret="game" src="bin-debug/Bg.js"></script>
	<script egret="game" src="bin-debug/BigWin.js"></script>
	<script egret="game" src="bin-debug/childPanle/AutoGameSys.js"></script>
	<script egret="game" src="bin-debug/childPanle/AutoRotationSetting.js"></script>
	<script egret="game" src="bin-debug/Am.js"></script>
	<script egret="game" src="bin-debug/childPanle/CumtomRotation.js"></script>
	<script egret="game" src="bin-debug/childPanle/DirectionPanle.js"></script>
	<script egret="game" src="bin-debug/childPanle/ExplainPromptPanle.js"></script>
	<script egret="game" src="bin-debug/childPanle/PaylistPanel.js"></script>
	<script egret="game" src="bin-debug/childPanle/Reconnect.js"></script>
	<script egret="game" src="bin-debug/childPanle/Reload.js"></script>
	<script egret="game" src="bin-debug/childPanle/Setting.js"></script>
	<script egret="game" src="bin-debug/childPanle/SysSettingPanle.js"></script>
	<script egret="game" src="bin-debug/controls/CheckBox.js"></script>
	<script egret="game" src="bin-debug/controls/NumCtrl.js"></script>
	<script egret="game" src="bin-debug/controls/NumPanel.js"></script>
	<script egret="game" src="bin-debug/controls/NumPanel2.js"></script>
	<script egret="game" src="bin-debug/controls/SwitchBtu.js"></script>
	<script egret="game" src="bin-debug/CrystalPanle.js"></script>
	<script egret="game" src="bin-debug/cystal/AutoRotation.js"></script>
	<script egret="game" src="bin-debug/cystal/AutoRotationBtn.js"></script>
	<script egret="game" src="bin-debug/cystal/CrystalDisB.js"></script>
	<script egret="game" src="bin-debug/cystal/CrystalDisS.js"></script>
	<script egret="game" src="bin-debug/cystal/PaylistBtn.js"></script>
	<script egret="game" src="bin-debug/cystal/RotatBtn.js"></script>
	<script egret="game" src="bin-debug/cystal/RotationBtn.js"></script>
	<script egret="game" src="bin-debug/Gun/GunAm.js"></script>
	<script egret="game" src="bin-debug/Gun/GunDeal.js"></script>
	<script egret="game" src="bin-debug/Gun/GunOne.js"></script>
	<script egret="game" src="bin-debug/Gun/GunPanel.js"></script>
	<script egret="game" src="bin-debug/Gun/SymAm.js"></script>
	<script egret="game" src="bin-debug/WinMoneyLight.js"></script>
	<script egret="game" src="bin-debug/Gun/TeskGun.js"></script>
	<script egret="game" src="bin-debug/GunSound.js"></script>
	<script egret="game" src="bin-debug/ImageBitmap.js"></script>
	<script egret="game" src="bin-debug/KeyDeal.js"></script>
	<script egret="game" src="bin-debug/Lianxian.js"></script>
	<script egret="game" src="bin-debug/LoadResource/AssetAdapter.js"></script>
	<script egret="game" src="bin-debug/LoadResource/LoadGroup.js"></script>
	<script egret="game" src="bin-debug/LoadResource/LoadIngDeal.js"></script>
	<script egret="game" src="bin-debug/LoadResource/LoadingUI.js"></script>
	<script egret="game" src="bin-debug/LoadResource/LoadingUINew.js"></script>
	<script egret="game" src="bin-debug/LoadResource/LoadRes.js"></script>
	<script egret="game" src="bin-debug/LoadResource/PreloadGroup.js"></script>
	<script egret="game" src="bin-debug/LoadResource/ThemeAdapter.js"></script>
	<script egret="game" src="bin-debug/LoadResource/Wrun.js"></script>
	<script egret="game" src="bin-debug/Main.js"></script>
	<script egret="game" src="bin-debug/mainPanle/MainBg.js"></script>
	<script egret="game" src="bin-debug/mainPanle/MainPanel.js"></script>
	<script egret="game" src="bin-debug/mainPanle/MainTop.js"></script>
	<script egret="game" src="bin-debug/mainPanle/More.js"></script>
	<script egret="game" src="bin-debug/mainPanle/MoreUI.js"></script>
	<script egret="game" src="bin-debug/mainPanle/WalkingLight.js"></script>
	<script egret="game" src="bin-debug/sound/BGM.js"></script>
	<script egret="game" src="bin-debug/sound/SoundDeal.js"></script>
	<script egret="game" src="bin-debug/sound/SoundOne.js"></script>
	<script egret="game" src="bin-debug/SystemManger.js"></script>
	<script egret="game" src="bin-debug/UserData/AccountData.js"></script>
	<script egret="game" src="bin-debug/UserData/FreePanle.js"></script>
	<script egret="game" src="bin-debug/UserData/LeftPanle.js"></script>
	<script egret="game" src="bin-debug/UserData/PreferenceData.js"></script>
	<script egret="game" src="bin-debug/UserData/UserDeal.js"></script>
	<script egret="game" src="bin-debug/WinFreeNum.js"></script>
	<script egret="game" src="bin-debug/WinMoney.js"></script>
	<script egret="game" src="bin-debug/Gun/SymImg.js"></script>
	<!--game_files_end-->
</head>
<body>
	<!--<div style="width: 1000px;height: 1000px;position: absolute;z-index: 99"></div>-->
	<div id="floater"></div>
	<div style="margin: auto;width: 100%;height: 100%;" id="ok" class="egret-player" data-entry-class="Main" data-orientation="auto" data-scale-mode="fixedWidth" data-frame-rate="30"
data-content-width="1080" data-content-height="1920" data-show-paint-rect="false" data-multi-fingered="2" data-show-fps="false"
data-show-log="false" data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:1">
</div>

<div class="slide_bar_wrapper_open" id="slide_bar_wrapper" >
	<div class="floater">

	</div>
		<div id="slide_bar" class="slide_bar" style=" visibility: visible;">
				<div class="slide_bar_content">
						<a href="google.com.tw">Google</a>
				</div>
				<div class="slide_bar_open" id="slide_bar_btn"></div>
		</div>
</div>

<script src="libs/game.js" charset="utf-8"></script>

	<script>
	    var Container = {
        SetPromotionOpen:function(value /*设定优惠开关*/){
            //设定优惠开关 1为开0为关
            this.SetCookie("_GamePromo", value);
        },
        GetPromotionOpen:function(){
            //回传优惠开关 1为开0为关
            return this.GetCookie('_GamePromo');
        },

        SetSound:function(value /*设定音效值*/){
            //设定音效值 1~100
            this.SetCookie("_GameSoundVolumn", value);
        },
        GetSound:function(){
            //回传音效值 1~100
            return this.GetCookie('_GameSoundVolumn');
        },

        SetSoundSwitch:function(value){
            //设定音效開關 1为开0为关
            this.SetCookie("_GameSound", value);
        },
        GetSoundSwitch:function(){
            //取得音效開關 1为开0为关
            return this.GetCookie('_GameSound');
        },
        SetMusicSwitch:function(value){
            //設定音樂開關 1为开0为关
            this.SetCookie("_GameMusic", value);
        },
        GetMusicSwitch:function(){
            return this.GetCookie('_GameMusic');
            //取得音樂開關 1为开0为关
        },

        SetCookie:function(name , value){
            //设定cookie值（只能为字串）_每款游戏会分开纪录
//          console.log("SetC", name, value);
            var cookieDate = new Date();
            var NextYearTime = cookieDate.getTime() + (365 * 86400 * 1000);
            cookieDate.setTime(NextYearTime);
            document.cookie = name + "=" + encodeURIComponent(value) + "; expires=" + cookieDate.toUTCString();

        },
        GetCookie:function(name){
            //取得cookie值_每款游戏会分开纪录
            return this.ParseCookie()[name];

        },
        SetDisplay:function(data){
            //Token2 为 DebugMode时将送给GS和GS回应的值分别带入
            market_operator.DispData(data);
        },

        SetData:function(action /*回传的Action*/, data /*每次呼叫Gs API回传的ScreenData都直接带入*/){
            //我们会在此建立我们Html专用功能
            // console.log(action, data);
            // if(data.ScreenActions && data.ScreenActions.length>0) {
            //     for(var index in data.ScreenActions) {

            //         switch(data.ScreenActions[index].Action){
            //             case "Close":
            //             case "OpenWindow":
            //             break;

            //             case "OpenCover":
            //             case "Message":
            //             case "ShowYesNo":
            //                 this.action_in_quene.push(data.ScreenActions[index]);
            //             break;
            //             default :
            //                 this.ScreenAction(data.ScreenActions[index].Action, data.ScreenActions[index].Params);
            //             break ;
            //         }

            //     }
            //     console.log(this.action_in_quene);
            //     if( this.action_in_quene.length>0){
            //         this.DoScreenActionInQuene();
            //     }

            // }
        },

        DoScreenActionInQuene:function(){

	        if(this.queneIndex < this.action_in_quene.length ){
	            this.ScreenAction(this.action_in_quene[this.queneIndex].Action, this.action_in_quene[this.queneIndex].Params);
	            this.queneIndex++ ;
	        }


        },

        ScreenAction:function(action , params){
            //执行Screen Action 带入参数会执行相对的动作
//          console.log(action);
            market_operator.doAction(action, params);
        },
        ParseCookie: function() {
            var cookie_array = {};
            var cookie = document.cookie;
            var cookie_sets = cookie.split(';');
            for(var num in cookie_sets) {
                var sets = cookie_sets[num].split('=');
                var cookie_key = sets[0].replace(/^\s+|\s+$/g, '');
                delete sets[0];
                var cookie_value = sets.join('=');
                cookie_value = cookie_value.replace(/^=/,"");
               cookie_array[cookie_key] = decodeURIComponent(cookie_value);
            }
            return cookie_array;
        },
        action_in_quene:[],
        queneIndex:0,
    };
		var CasinoGame = {
			Game_id: "05801001006",
			Skin: 'normal', // 依平台給予設定
			Link_auth: '2345678345678', //    連線授權碼
			UrlBase: 'ws://45.79.81.121:8083', //GS API 呼叫网址
			PartnerId: 'pts', //此部分为平台商识别
			PlayerId: 'user_372', //此部分为玩家帐号识别
			Token: '194A94614AA8F421A22FF9567E26E513',
			IP: '', //                玩家ＩＰ
			Language: 'chs', //语言代码
			GameCanvas: 'game_block', //游戏画布开启的区块识别
			vtoken_interval: '10', //多久要传token一次（单位秒）
			crnex: '',
			udf1: '',
			udf2: '',
			udf3: '',
			udf4: '',
			udf5: ''
		}

		/**
		 *  请将业务的处理的数据，放置以下
		 */
		init();
		egret.runEgret({
			renderMode: "webgl",
			audioType: 0
		});
	</script>

	<!-- 保留结束 -->
</body>

</html>
